package expressions.slogo;

import model.Turtle;
import controller.TurtleController;
import expressions.Expression;
import expressions.IRecursiveContext;
import java.util.List;

/**
 * A more specific kind of context that can also take care of Turtle movement.
 * 
 * Commands do not need to take care of things like actually drawing lines:
 * rather, they should leave this to the context.
 */
public interface ITurtleContext extends IRecursiveContext<Double>
{
    /**
     * Returns the current turtle.
     */
    public Turtle getTurtle();

    /**
     * Returns the controller.
     */
    public TurtleController getController();

    /**
     * Evaluates an expression on the turtles that are currently active.
     */
    public Double evaluateForActiveTurtles(Expression<Double> expression);

    /**
     * Evaluates an expression for a given list of turtles.
     */
    public Double evaluateForTurtles(Expression<Double> expression, List<Integer> turtleIDs);

    /**
     * Sets which turtles are currently active.
     */
    public void setActiveTurtles(List<Integer> turtleIDs);
}
